platform :ios, '14.0'

workspace 'ADAC.xcworkspace'

plugin 'cocoapods-keys', {
    :project => "ADAC",
    :keys => [
        "WahooConsumerKey_Sandbox",
        "WahooConsumerSecret_Sandbox",
        "WahooConsumerKey",
        "WahooConsumerSecret",
        "GarminConsumerKey_Sandbox",
        "GarminConsumerSecret_Sandbox",
        "GarminConsumerKey",
        "GarminConsumerSecret"
    ]
}

inhibit_all_warnings!

def global_pods
  pod 'UIImageColors'
  pod 'SDWebImage'
  pod 'Purchases'
  pod 'BetterCodable', '~> 0.1.0'
end

target 'ADAC' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  global_pods

  # Pods for ADAC
  pod 'Cache'
  pod 'PureLayout'
  pod 'UICountingLabel'
  pod 'ScalingCarousel'
  pod 'FeedKit', '~> 9.0'
  pod 'SwiftRichString'
  pod 'SCNLine', '~> 1.0'
  pod 'ffmpeg-kit-ios-min', '~> 4.5'
  pod 'OAuthSwift', :git => 'git@github.com:Any-Distance/OAuthSwift.git', :branch => 'master'
  pod 'MetalPetal'
  pod 'MetalPetal/Swift'
  pod 'HCKalmanFilter'
end

post_install do |installer|
  puts 'Running ADAC Post-Install Script'

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'

      if target.name.end_with? "PureLayout"
        if config.build_settings['APPLICATION_EXTENSION_API_ONLY'] == 'YES'
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'PURELAYOUT_APP_EXTENSIONS=1']
        end
      end
    end
  end
end
